package com.aboverock.module.system.service;

import java.util.List;

import com.aboverock.module.system.domain.User;

/**
 * The Interface LdapService.
 *
 * @author Rock Wang
 */
public interface LdapService {

    /**
     * 根据AD域帐号名从LDAP精确查询用户.
     *
     * @param dn the dn
     * @return the list
     */
    public List<User> searchLdapUsers(String dn);

    /**
     * 根据AD域帐号名从LDAP模糊查询用户.
     *
     * @param dn the dn
     * @return the list
     */
    public List<User> fuzzySearchLdapUsers(String dn);

    /**
     * LDAP认证.
     *
     * @param loginName the login name
     * @param credentials the credentials
     * @return true, if successful
     */
    public boolean authenticate(String loginName, String credentials);
}
